/**
 * @author janet
 * @date 2015-4-30
 */
package net.oscorner.services.user;

import java.sql.SQLException;
import java.util.List;

import net.oscorner.dao.user.UserDao;
import net.oscorner.entiry.User;


/**
 * @author janet
 * @date 2015-4-30 下午4:10:45
 * 
 */

public class UserServiceImpl implements UserService{

	private UserDao dao;
	
	public UserDao getDao() {
		return dao;
	}

	public void setDao(UserDao dao) {
		this.dao = dao;
	}

	@Override
	public boolean checkUser(User user) {
		// TODO Auto-generated method stub
		try {
			return dao.checkUser(user);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return false;
		}
	}

	/* (non-Javadoc)
	 * @see net.oscorner.services.user.UserService#queryUsers(net.oscorner.entiry.User)
	 */
	@Override
	public List<User> queryUsers(User user) {
		// TODO Auto-generated method stub
		try {
			return dao.queryUserList(user);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

}
